#include <stdio.h>
#include <stdlib.h>

int main()
{
    double r,h;
    scanf("%lf%lf",&r,&h);
    double pi=3.14159;
    printf("%.3f\n",2*pi*r*r+2*pi*r*h);
    return 0;
}
